home *** CD-ROM | disk | FTP | other *** search
- RCS file: /net/acae127/home/bammi/etc/src/master/ash/error.c,v
- retrieving revision 1.1
- diff -c -r1.1 error.c
- *** 1.1 1992/10/07 04:18:30
- --- error.c 1992/11/19 23:22:39
- ***************
- *** 173,181 ****
- --- 173,189 ----
- char *msg; /* text describing the error */
- };
-
- + #ifdef atarist
-
- #define ALL (E_OPEN|E_CREAT|E_EXEC)
- + #ifndef ERROR
- + #define ERROR EERROR
- + #endif
-
- + #ifndef EWRITF
- + #define EWRITF EWRITE
- + #endif
- +
- STATIC const struct errname errormsg[] = {
- ERROR, ALL, "generic error",
- EDRVNR, ALL, "drive not ready",
- ***************
- *** 213,219 ****
- ERANGE, ALL, "math range error",
- EDOM, ALL, "math domain error"
- };
- !
-
- /*
- * Return a string describing an error. The returned string may be a
- --- 221,229 ----
- ERANGE, ALL, "math range error",
- EDOM, ALL, "math domain error"
- };
- ! #else
- ! STATIC const struct errname errormsg[] = { 0, 0, 0 };
- ! #endif
-
- /*
- * Return a string describing an error. The returned string may be a
- ***************
- *** 223,229 ****
-
- char *
- errmsg(e, action) {
- ! struct errname const *ep;
- static char buf[12];
-
- for (ep = errormsg ; ep->errcode ; ep++) {
- --- 233,239 ----
-
- char *
- errmsg(e, action) {
- ! struct errname *ep;
- static char buf[12];
-
- for (ep = errormsg ; ep->errcode ; ep++) {
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/ash/eval.h,v
- retrieving revision 1.1
- diff -c -r1.1 eval.h
- *** 1.1 1992/10/07 04:18:30
- --- eval.h 1992/11/19 23:22:39
- ***************
- *** 51,57 ****
- --- 51,59 ----
-
- #ifdef __STDC__
- void evalstring(char *);
- + #ifndef __hpux
- union node; /* BLETCH for ansi C */
- + #endif
- void evaltree(union node *, int);
- void evalbackcmd(union node *, struct backcmd *);
- #else
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/ash/exec.c,v
- retrieving revision 1.1
- diff -c -r1.1 exec.c
- *** 1.1 1992/10/07 04:18:30
- --- exec.c 1992/10/07 22:47:55
- ***************
- *** 145,150 ****
- --- 145,153 ----
- #else
- tryexec(cmdname, argv, envp);
- #endif
- + #ifndef ENOTDIR
- + #define ENOTDIR EPATH
- + #endif
- if (errno != ENOENT && errno != ENOTDIR)
- e = errno;
- }
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/ash/expand.h,v
- retrieving revision 1.1
- diff -c -r1.1 expand.h
- *** 1.1 1992/10/07 04:18:30
- --- expand.h 1992/11/19 23:22:39
- ***************
- *** 48,54 ****
- --- 48,56 ----
- };
-
- #ifdef __STDC__
- + #ifndef __hpux
- union node;
- + #endif
- void expandarg(union node *, struct arglist *, int);
- void expandhere(union node *, int);
- int patmatch(char *, char *);
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/ash/input.c,v
- retrieving revision 1.1
- diff -c -r1.1 input.c
- *** 1.1 1992/10/07 04:18:30
- --- input.c 1993/02/25 23:11:36
- ***************
- *** 181,187 ****
- --- 181,212 ----
- flushout(&errout);
- retry:
- p = parsenextc = parsefile->buf;
- + #if defined(WANT_READLINE)
- + if(parsefile->fd == 0)
- + {
- + extern char * readline();
- + extern void add_history();
- + char *s = readline("");
- + if(s)
- + {
- + add_history(s);
- + if((i = strlen(s)+1) > BUFSIZ)
- + {
- + s[BUFSIZ-1] = '\0';
- + i = BUFSIZ;
- + }
- + strcpy(p, s);
- + p[i-1] = '\n';
- + free(s);
- + }
- + else
- + i = 0;
- + }
- + else
- + i = read(parsefile->fd, p, BUFSIZ);
- + #else
- i = read(parsefile->fd, p, BUFSIZ);
- + #endif
- if (i <= 0) {
- if (i < 0) {
- if (errno == EINTR)
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/ash/main.c,v
- retrieving revision 1.1
- diff -c -r1.1 main.c
- *** 1.1 1992/10/07 04:18:30
- --- main.c 1993/02/25 23:11:37
- ***************
- *** 151,157 ****
- --- 151,161 ----
- read_profile("/etc/profile");
- state1:
- state = 2;
- + #ifndef atarist
- read_profile(".profile");
- + #else
- + read_profile("profile");
- + #endif
- } else if ((sflag || minusc) && (shinit = getenv("SHINIT")) != NULL) {
- state = 2;
- evalstring(shinit);
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/ash/makefile,v
- retrieving revision 1.1
- diff -c -r1.1 makefile
- *** 1.1 1992/10/07 04:18:30
- --- makefile 1993/02/25 23:11:38
- ***************
- *** 1,8 ****
- # %W% (Berkeley) %G%
- ! CC=gcc
- PROG=sh.ttp
- STUBS=builtins cd dirent echo error eval exec expand input jobs mail \
- ! main memalloc miscblti mystring nodes options parser redir show signames \
- syntax trap output var init
- OBJS=$(addsuffix .o, $(STUBS))
- SRCS=$(addsuffix .c, $(STUBS))
- --- 1,8 ----
- # %W% (Berkeley) %G%
- ! CC=cgcc -mint -mbaserel -mpcrel
- PROG=sh.ttp
- STUBS=builtins cd dirent echo error eval exec expand input jobs mail \
- ! main memalloc miscbltin mystring nodes options parser redir show signames \
- syntax trap output var init
- OBJS=$(addsuffix .o, $(STUBS))
- SRCS=$(addsuffix .c, $(STUBS))
- ***************
- *** 10,18 ****
- input.h jobs.h machdep.h mail.h main.h memalloc.h mystring.h nodes.h \
- options.h output.h parser.h redir.h shell.h signames.h \
- syntax.h trap.h var.h
- ! CFLAGS=-DSHELL -I. -O -fstrength-reduce -finline-functions -fomit-frame-pointer
- ! LDFLAGS=
- ! LOADLIBES=
- FUNCS=$(addprefix funcs/, cmv dirs kill login newgrp popd pushd suspend)
- DOCS=dump dinfo lastdump sh.1 tour test.1 readme.st copying copying.sh
- ORGFILES=makefile.org token.def mktokens mkbuilti builtins.def mkinit.c \
- --- 10,18 ----
- input.h jobs.h machdep.h mail.h main.h memalloc.h mystring.h nodes.h \
- options.h output.h parser.h redir.h shell.h signames.h \
- syntax.h trap.h var.h
- ! CFLAGS=-DSHELL -I. -O2 -fstrength-reduce -fomit-frame-pointer -DWANT_READLINE
- ! LDFLAGS= -v
- ! LOADLIBES= ../editline/bmlibedit.olb -lbmtermcap
- FUNCS=$(addprefix funcs/, cmv dirs kill login newgrp popd pushd suspend)
- DOCS=dump dinfo lastdump sh.1 tour test.1 readme.st copying copying.sh
- ORGFILES=makefile.org token.def mktokens mkbuilti builtins.def mkinit.c \
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/ash/makefile.org,v
- retrieving revision 1.1
- diff -c -r1.1 makefile.org
- *** 1.1 1992/10/07 04:18:30
- --- makefile.org 1992/10/07 04:42:41
- ***************
- *** 46,48 ****
- --- 46,54 ----
-
- mksyntax: mksyntax.c parser.h
- $(CC) $(CFLAGS) mksyntax.c -o $@
- +
- + clean:
- + rm -f $(OBJS) $(CLEANFILES)
- +
- + realclean: clean
- + rm -f sh report core
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/ash/mystring.h,v
- retrieving revision 1.1
- diff -c -r1.1 mystring.h
- *** 1.1 1992/10/07 04:18:30
- --- mystring.h 1992/10/07 22:48:11
- ***************
- *** 47,57 ****
- --- 47,61 ----
- int prefix(const char *, const char *);
- int number(const char *);
- int is_number(const char *);
- + #if 0
- int strcmp(const char *, const char *); /* from C library */
- char *strcpy(char *, const char *); /* from C library */
- int strlen(const char *); /* from C library */
- char *strcat(char *, const char *); /* from C library */
- #else
- + #include <string.h>
- + #endif
- + #else
- void scopyn();
- char *strchr();
- void mybcopy();
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/ash/redir.h,v
- retrieving revision 1.1
- diff -c -r1.1 redir.h
- *** 1.1 1992/10/07 04:18:30
- --- redir.h 1992/11/19 23:22:39
- ***************
- *** 41,47 ****
- --- 41,49 ----
- #define REDIR_BACKQ 02 /* save the command output in memory */
-
- #ifdef __STDC__
- + #ifndef __hpux
- union node;
- + #endif
- void redirect(union node *, int);
- void popredir(void);
- void clearredir(void);
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/ash/shell.h,v
- retrieving revision 1.1
- diff -c -r1.1 shell.h
- *** 1.1 1992/10/07 04:18:30
- --- shell.h 1992/10/07 04:42:41
- ***************
- *** 55,61 ****
-
-
- #define JOBS 1
- ! #define SYMLINKS 0
- #define DIRENT 1
- #define UDIR 0
- #define ATTY 0
- --- 55,61 ----
-
-
- #define JOBS 1
- ! #define SYMLINKS 1
- #define DIRENT 1
- #define UDIR 0
- #define ATTY 0
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/ash/var.c,v
- retrieving revision 1.1
- diff -c -r1.1 var.c
- *** 1.1 1992/10/07 04:18:30
- --- var.c 1992/11/19 23:22:39
- ***************
- *** 87,92 ****
- --- 87,96 ----
- struct var vterm;
- #endif
-
- + #ifdef __MBASE__
- + #define const /* cannot reference data segment in text structures */
- + #endif
- +
- const struct varinit varinit[] = {
- #if ATTY
- {&vatty, VSTRFIXED|VTEXTFIXED|VUNSET, "ATTY="},
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/ash/var.h,v
- retrieving revision 1.1
- diff -c -r1.1 var.h
- *** 1.1 1992/10/07 04:18:30
- --- var.h 1992/11/19 23:22:39
- ***************
- *** 105,111 ****
- --- 105,113 ----
- void initvar();
- void setvar(char *, char *, int);
- void setvareq(char *, int);
- + #ifndef __hpux
- struct strlist;
- + #endif
- void listsetvar(struct strlist *);
- char *lookupvar(char *);
- char *bltinlookup(char *, int);
-